package com.kyivmohyla.kma2.client.events.operator;

import com.google.gwt.event.shared.GwtEvent;
import com.kyivmohyla.kma2.shared.model.UIImportOrder;

public class OperatorImportEvent extends GwtEvent<OperatorImportEventHandler> {
    public static Type<OperatorImportEventHandler> TYPE = new Type<OperatorImportEventHandler>();
    private UIImportOrder importOrder;

    public OperatorImportEvent(UIImportOrder importOrder) {
        this.importOrder = importOrder;
    }

    public UIImportOrder getImportOrder() {
        return importOrder;
    }

    public Type<OperatorImportEventHandler> getAssociatedType() {
        return TYPE;
    }

    protected void dispatch(OperatorImportEventHandler handler) {
        handler.onOperatorImport(this);
    }
}
